﻿namespace NJQuery {

	/// <summary>
	/// Defines the contract needed by the jQuery UI server controls render effect definitions to the client.
	/// </summary>
	public interface IEffect {


		#region Properties

		/// <summary>
		/// Gets the programmatic identifier assigned to the server control.
		/// </summary>
		string ControlId { get; }

		/// <summary>
		/// Gets the name of the jQuery UI effect.
		/// </summary>
		string Effect { get; }

		/// <summary>
		/// Gets the duration/speed of the jQuery UI effect.
		/// </summary>
		Duration Speed { get; }

		#endregion Properties


		#region Methods: Rendering hooks

		/// <summary>
		/// Returns a <see cref="PropertyCollection"/> containing option values specific to the effect.
		/// This method is used primarily by control developers.
		/// </summary>
		/// <returns>A <see cref="PropertyCollection"/> containing the effect's option values.</returns>
		PropertyCollection CreateOptionProperties();

		/// <summary>
		/// Creates the properties object that will be rendered as the jQuery UI initialization options.
		/// This method is used primarily by control developers.
		/// </summary>
		/// <returns>A <see cref="PropertyCollection"/> object that will become the jQuery UI initialization options.</returns>
		PropertyCollection CreateProperties();

		#endregion


	}

}